// const { getImg } = require("../service/wallPaper.service")
import wallPaperService from "../service/wallPaper.service.js"
const { getImg } = wallPaperService

class WallpaperController {
  // 获取随机图片 http 地址
  async getRanImg(ctx) {
    const { israndom } = ctx.request.query
    try {
      const imgUrl = await getImg(israndom)
      ctx.echo({ imgUrl })
    } catch (error) {
      console.log(error)
    }
  }
}

export default new WallpaperController()
